<template>
	<view class="" >
		<view class="work_list" v-for="(item,index) in lists">
			<view class="imgs">
				<img :src="userInfo.img" alt="">
			</view>
			<view class="poerty">
				<p class="users">{{item.user_name}}</p>
				<p class="w">{{item.content}}</p>
			</view>
			<view>
				<text style="color: blueviolet;"  v-if="item.status==0">审核中</text>
			</view>
		</view>
			<img class="xinjian" src="../../../static/xinjian.png" alt="" @click="gowork"/>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo:'',
				lists:[]
			}
		},
		onLoad() {
			let self=this
			this.userInfo = uni.getStorageSync('user');
			setTimeout(()=>{
				self.list()
			},0)
		},
		methods: {
			list(){
				this.$api.user_work({content:this.userInfo.name,status:0}).then(res=>{
					this.lists=res.rows;
				})
			},
			gowork(){
				uni.navigateTo({
					url:"/pages/work/index"
				})
			},
		}
	}
</script>

<style lang="scss">
.work_list{
		display: flex;
		align-items: center;
		width: 100%;
		padding-bottom: 20px;
		border-bottom: 1px solid #f5f5f5;
		margin-top: 20px;
		justify-content: space-between;
		.imgs{
			img{
				width: 48px;
				height: 48px;
					padding-left: 10px;
			}
		}
		.poerty{
			padding-left: 10px;
			width: 268px;
			.users{
				color: #596687;
				font-size: 35rpx;
				padding-top: 20rpx;
			}
			.w{
				
			}
		}
		
	}
.xinjian{
			position: fixed;
			bottom: 0;
			width: 54px;
			height: 54px;
		 
		  left: 50%;
		  transform: translate(-50%, -50%);
			
			
		}
</style>
